import http from "@/utils/request";
import type { Coach, CoachPageVO, CoachQuery } from "./types";
import type { AxiosPromise } from 'axios'

export const getCoachForm = (id: number) => {
  return http.request({
    url: '/api/v1/coach/getCoach',
    method: 'get',
    params: {id: id},
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

/**
 * 分页获取教练分页列表
 * @param coachQuery
 */
export const getCoachPage = (coachQuery: CoachQuery) => {
  return http.request({
    url: '/api/v1/coach/page',
    method: 'get',
    params: coachQuery,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

/**
 * 新增教练数据
 * @param data
 */
export const addCoach = (coach: Coach) => {}

/**
 * 修改教练数据
 * @param data
 */
export const updateCoach = (data: AxiosPromise) => {}

/**
 * 删除教练数据
 * @param data
 */
export const deleteCoach = (data: AxiosPromise) => {}

